﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace XNAGame_Lab1
{
    public class MyXNAText : GameEntity
    {
        MyText2D Text2D;
        Vector2 _TopLeft;
        public MyXNAText(ContentManager content,string text,SpriteFont spritesFont,Vector2 topleft)
        {
            _TopLeft = topleft;

            Text2D = new MyText2D(content, text, spritesFont,_TopLeft);
        }
        /// <summary>
        /// ham doc tu file xml
        /// </summary>
        /// <param name="content">content</param>
        /// <param name="namefileXNA">ten file xml</param>
        public MyXNAText(ContentManager content, string namefileXNA)
        { 
        
        }
        public MyXNAText(MyText2D text2D)
        {
            Text2D = text2D;
        }

        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            Text2D.Draw(gameTime, spriteBatch);
        }
        public override void Update(GameTime gameTime)
        {
            Text2D.Update(gameTime);
        }
    }
}
